<script>
	import { mapMutations } from 'vuex';

	export default {
		onLaunch: function() {
			    this.$store.dispatch('handleGetWordKey');
			    this.handleInit();
			    this.handleSetTabBar();
			    const list = this.auth.getWallets();
			    getApp().globalData.account_list = list ? list : [];
		},
		onShow: function() {
			console.log('App Show');
		},
		onHide: function() {
			console.log('App Hide');
		},
		methods: {
		    ...mapMutations(['setCurThemeType']),
		    handleSetTabBar() {
		      const theme = uni.getStorageSync('theme');
		      this.setCurThemeType(theme);
		      if (theme === 'dark') {
		        uni.setTabBarStyle({
		          color: '#9299A7',
		          selectedColor: '#3C79FF',
		          backgroundColor: '#2B3757'
		        });
		      } else {
		        uni.setTabBarStyle({
		          color: '#9299A7',
		          selectedColor: '#3C79FF',
		          backgroundColor: '#fff'
		        });
		      }
			  }
		}
	}
	
</script>

<style>
	/*每个页面公共css */

</style>
